<template>
  <div class="user">
    <a-list
      item-layout="horizontal"
      :data-source="datalist"
      :grid="{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 3 }"
    >
      <template #renderItem="{ item }">
        <a-list-item>
          <a-card hoverable style="width: 150px; height: 150px">
            <template #cover>
              <img :src="require('@/assets/avatar.png')" />
            </template>
            <a-card-meta :title="item.userName">
              <template #description>{{ item.userProfile }}</template>
            </a-card-meta>
          </a-card>
        </a-list-item>
      </template>
    </a-list>
  </div>
</template>

<script setup lang="ts">
import { withDefaults, defineProps } from "vue";
interface Props {
  datalist: any[];
}
const props = withDefaults(defineProps<Props>(), {
  datalist: () => [],
});
</script>

<style scoped></style>
